package com.zhuna.www.service;

import com.zhuna.www.po.User;

import java.sql.SQLException;
import java.util.List;

public interface UserService {
    //用户增删改查服务层接口

    // 注册新用户
    int register(User user) throws SQLException;

    // 登录验证
    User login(String name, String password) throws SQLException;

    // 更新用户信息（用户名或密码）
    int updateUser(int userId, String newName, String newPassword) throws SQLException;

    // 删除用户
    int deleteUser(String name) throws SQLException;

    // 查询所有用户
    List<User> getAllUsers() throws SQLException;

    // 根据用户名查找用户
    User getUserByName(String name) throws SQLException;

    //根据名字查找余额
    double getWalletBalanceByName(String name) throws SQLException;

}
